package exception;

import java.io.FileNotFoundException;

/*异常的抛出*/
public class ThrowDemo {
    public static void main(String[] args) {
        Student zs = new Student();

        try {
            zs.setAge(99);
        } catch (IllegalAgeException e) {
            e.printStackTrace();
        }
        System.out.println(zs.getAge());
    }
}
